#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstring>
#include <fstream>
#include <algorithm>

class Ticket
{
private:
    char *name_;
    double price_;
    int quantity_;

public:
    friend std::ostream &operator<<(std::ostream &out, const Ticket &t);
    friend std::istream &operator>>(std::istream &in, Ticket &t);

    Ticket();
    Ticket(const char *name, double price, int quantity);
    Ticket(const Ticket &other);
    Ticket &operator=(const Ticket &other);
    ~Ticket();

    const char *getName() const;
    double getPrice() const;
    int getQuantity() const;

    void setName(const char *name);
    void setPrice(double price);
    void setQuantity(int quantity);
    static void editTicket(Ticket &ticket);
    static void readTicketFromFile(Ticket &ticket);
    static void writeTicketToFile(const Ticket &ticket);
    static void printTicket(const Ticket &ticket);
};
